# Maintainer: David Runge <dvzrv@archlinux.org>
# Contributor: Christopher Arndt <aur -at- chrisarndt -dot- de>

pkgname=lv2file
pkgver=0.95
pkgrel=2
pkgdesc="A simple program which you can use to apply effects to your audio files"
arch=(loong64 x86_64)
url="https://github.com/jeremysalwen/lv2file"
license=(GPL3)
groups=(
  lv2-plugins
  pro-audio
)
depends=(
  argtable
  glibc
)
makedepends=(
  libsndfile
  lilv
  lv2
)
source=($url/archive/upstream/$pkgver/$pkgname-$pkgver.tar.gz)
sha512sums=('f166d018e7554cb2ae55bfa06b96b6e0cd69b2488e401951973cc278fc23a5edf6eaa7f7e39cdc18420035cebafe58737f44cd2f9fdf6533a0118853ed4e2d04')
b2sums=('a4dbb0e9aa680e751be60d415a86bf181f05688eb5ec5176aed25a8de3026a79ea46a2be9af563a8a1b58c24581acb90eaf222eca1b4b597466672683861a509')

build() {
  make all -C $pkgname-upstream-$pkgver
}

package() {
  depends+=(
    lilv liblilv-0.so
    libsndfile libsndfile.so
  )

  make DESTDIR="$pkgdir" install -C $pkgname-upstream-$pkgver
  install -vDm 644 $pkgname-upstream-$pkgver/$pkgname.1 -t "$pkgdir/usr/share/man/man1/"
  install -vDm 644 $pkgname-upstream-$pkgver/README -t "$pkgdir/usr/share/doc/$pkgname/"
}
